-
-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow for Abstract Effect Type in Schema Gen #951
Allow for Abstract Effect Type in Schema Gen #951
Conversation
def writeSubscriptionField(field: FieldDefinition, od: ObjectTypeDefinition)(implicit | ||
scalarMappings: ScalarMappings | ||
): String = | ||
): String = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sbt fmt
chose to do this :D
Unsure why CI is failing due to a time out, |
For some reason the 2.12 compilation of |
I merged #952 which seems to improve it, can you rebase so that you have it too? |
Allow for the use of an abstracted effect type in schema generation and add tests for usage.
03f78a0
to
f9f85d5
Compare
Done 👍 |
Looks good! How about using |
Add --abstractEffectType as a command line option and add tests to check it's parsed correctly.
Add to documentation in schema.md around usage of the --abstractEffectType option.
f9f85d5
to
5a0e2aa
Compare
Yeah that makes sense, I've made a few changes for this 👍
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for the contribution!
Hi! This PR allows the effect type of generated the generated
Queries
andMutations
classes to be abstract, ie:To do this, you can use the
--abstractEffectType
argument (hopefully I've added doc in the right place for this).Currently the
effect
parameter will be used as the abstract type value so to get the above example you would have to--abstractEffectType true --effect F
, though I'm unsure if this is best sinceeffect
defaults to the concrete typezio.UIO
(so you would getMutations[UIO[_]]
without specifyingF
😨 ). I was thinking maybe ignore the value ofeffect
if--abstractEffectType
is set and always useF
, what do you think?Let me know what you think... or if this is just a terrible idea 🙂